Set env_config value and add Serialize/Deserialize for Context#308
Merged
Conversation
|
We are having a similar issue using the v0.3.0 version of the runtime in a local or non AWS lambda environment. I can confirm without these changes (or setting the environment variables in docker-compose), when running the We planned to open a similar merge request in the near future, but will hold off until the maintainers have a chance to respond to this MR. |
bahildebrand
suggested changes
Mar 27, 2021
bahildebrand
left a comment
Contributor
There was a problem hiding this comment.
Overall this looks good. I think we might want to add some automated tests to prevent a regression like this in the future. I'll open an issue and look into it.
Closed
khuey
referenced
this pull request
Aug 5, 2021
* reorg * Replace `genawaiter` with `async-stream` (#240) * don't depend on serde_derive directly * Add Cargo.lock to gitignore; whoops. * Cleanup docs; handle panics in lambda functions correctly. * Create a reusable runtime struct + builder * Log handler errors in runtime. Issue #241 * Added basic.rs example, comments to other examples * Tidied up examples readme. * Fixed headers in examples readme. * Formatting fix in error-handling.rs. * Fixed comment in lib.rs * Corrected handler_fn interface misconception in basic.rs Co-authored-by: Veetaha <veetaha2@gmail.com> * Upper-cased and edited examples/readme.md * Add log and tracing examples; fix `tracing` dependency features. * disable time on `tracing_subscriber` * Removed unused refs from basic.rs * Added error handling for #241, interim, broken. * Added err logging to lib.rs, consolidated examples * Log panic as Debug+Display, improved examples * client.rs formatting fix * Fixed "Process exited" error in lib.rs. * Added some tracing!() to lib.rs. * Enforced Send+Sync for http Handler impl. * Added docs and missing _vars to reduce warnings * Removed unnecessary + Sync on handler's future * All tests passing * Remove deprecated simple_logger calls * Remove Cargo.lock * cargo fmt changes Co-authored-by: David Barsky <me@davidbarsky.com> Co-authored-by: Lucio Franco <luciofranco14@gmail.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-47-28.ap-southeast-2.compute.internal> Co-authored-by: rimutaka <max@onebro.me> Co-authored-by: Veetaha <veetaha2@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #260
Description of changes:
Context::env_configwhich was declared in master many commits ago, but was never set to anything#[derive(Serialize, Deserialize)]toContextandConfigstructssuccessful_end_to_end_runtest functionConfig::from_env0.3.1This change enables proxy-ing lambda requests via transports like AWS SQS for local debugging.
Adding Ser/Deser does not affect the binary size unless those features actually used, so there is no point making it an optional feature.
Backward compatibility: full
See issue #260 for background discussion and https://github.com/rimutaka/lambda-debug-proxy for a proxy example using this feature.
By submitting this pull request